package REMC.objects;

import java.util.Random;

import main.Dimensions;
import main.Grid;
import main.Protein;
import main.Sequence;
/**
 * @authors Tal Cohen & Adiel Ashrov
 * this class represents a replica of protein in a certain conformation
 * the replica also has it's own temperature
 */
public class Replica extends Protein{

	private Double _temperature;
	
	public Replica(Replica replica) {
		super(replica); //the copy constractor of Protein is called here!!!
		this._temperature = replica._temperature;
	}
	
	public Replica(Dimensions dimensions, Sequence sequence, Random random,
			Grid grid, String name,Double temperature) {
		super(dimensions, sequence, random, grid, name);
		this._temperature = temperature;
	}

	public Double get_temperature() {
		return _temperature;
	}

	public void set_temperature(Double _temperature) {
		this._temperature = _temperature;
	}

	public double getBeta(){
		return 1/this._temperature;
	}
	
	@Override
	public String toString(){
		return super.toString() + "temperature: "+this._temperature+"\n";
		
	}
	@Override
	public String toStringForCVec(){
		return super.toStringForCVec() + ", temperature = "+this._temperature+"\n";
		
	}

}
